Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Stop crashing when NPC picks up item in fetching activity #38503

Merged
merged 1 commit into from Mar 2, 2020
Merged

Stop crashing when NPC picks up item in fetching activity #38503

merged 1 commit into from Mar 2, 2020

Conversation

ghost
Copy link

@ghost ghost commented Mar 1, 2020

Summary

SUMMARY: Bugfixes "Stop crashing when NPC picks up item in fetching activity"

Purpose of change

Stop crashing when NPC picks up item in fetching activity

Describe the solution

Surprised this wasnt logged, but in my testing on something else, it always crashed when NPC picked up a tool as a result of the fetching activity.
This was due to it trying to access the name after the iterator had been invalidated ( maybe this wa sa regression of sorts at some point? it wasnt doing this last time I was working in this area, weeks ago )

Fixes that by moving the message block before the iterator is invalidated.

Describe alternatives you've considered

N/A

Testing

Before - ask NPC to fish, they go and fetch rod, it crashes when they pick it up.
After - it dosnt crash.

Additional context

N/A

@ZhilkinSerg ZhilkinSerg added <Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` NPC / Factions NPCs, AI, Speech, Factions, Ownership labels Mar 2, 2020
@ZhilkinSerg ZhilkinSerg merged commit 8aff074 into CleverRaven:master Mar 2, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
<Bugfix> This is a fix for a bug (or closes open issue) [C++] Changes (can be) made in C++. Previously named `Code` NPC / Factions NPCs, AI, Speech, Factions, Ownership
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant